优化微软登录未购买提示#5611
Conversation
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
burningtnt
left a comment
There was a problem hiding this comment.
在出现 no_license 或 no_character 错误时,应当主动将右下角的“登录”按键更改为“购买 Minecraft”或“创建档案”,并相对应地更改点击按钮后的动作。
在用户点击过一次按钮后,该按钮才应当显示“重新登陆”
|
这个 PR 做完了?确认了有效性吗? |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request improves the Microsoft account authentication process by distinguishing between a missing Minecraft license and a missing game profile. It introduces new exception types and updates localization files for English and Chinese. A logic flaw was identified in the profile retrieval process: when a 404 error occurs but a license is found, the code fails to throw the appropriate profile-not-found exception, which would lead to subsequent execution errors. Additionally, the review suggests adding null checks for the license response to prevent potential NullPointerExceptions.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
CC @Glavo |
|
部分情况下买了游戏有档案直接登陆也不行,去minecraft.net登陆一下账号再登陆启动器就好了,我不知道具体原因 |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refines the Microsoft authentication flow by distinguishing between a missing Minecraft license and a missing game profile, introducing specific exceptions and updating localization strings. A review comment identifies a potential NullPointerException in the license check logic and suggests adding retry logic for consistency with other API calls.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request improves the Microsoft account authentication process by distinguishing between a missing Minecraft license and a missing game profile. It introduces specific exceptions and localized error messages for both cases. In MicrosoftService.java, a check for the game_minecraft entitlement was added when a profile is not found. A review comment suggests adding a retry mechanism to the license entitlement API call to enhance reliability and maintain consistency with other network requests in the codebase.
| MinecraftLicense license = HttpRequest.GET("https://api.minecraftservices.com/entitlements/license") | ||
| .authorization(tokenType, accessToken) | ||
| .getJson(MinecraftLicense.class); |
Uh oh!
There was an error while loading. Please reload this page.